package com.xyt.jax.ws.web.client.bootstrap;

import com.xyt.jax.ws.web.impl.HelloWorldService;
import com.xyt.jax.ws.web.impl.HelloWorldServiceImplService;

/**
* 摘要：
* @author xyt
* @version 1.0
* @create 2016-12-29 11:58
**/
//wsimport -keep http://localhost:8080/jax-ws-web-server/service/HelloWorldService?wsdl
public class ClientMain {
    public static void main(String[] args) {
        //创建HelloWorldImplService对象
        HelloWorldServiceImplService hws = new HelloWorldServiceImplService();
        //通过getHelloWorldImplPort方法获取HelloWorldImpl实例
        HelloWorldService hw = hws.getHelloWorldServiceImplPort();
        //使用HelloWorldImpl实例，像直接调用服务端方法一样，调用Web服务，获取WebService响应数据
        String retVal = hw.sayHello("Jone");
        System.out.println(retVal);

    }

}
